import { reactive } from 'vue'

export function useTable() {
    const gridOptions = reactive<any>({
        align: 'center',
        border: true,
        columnConfig: {
            resizable: true,
        },
        columns: [
            { type: 'seq', width: 50, title: '序号' },
            { field: 'userName', width: 200, title: '用户名称' },
            { field: 'communityName', title: '所在小区', minWidth: 200 },
            { field: 'phone', title: '联系电话', width: 150 },
            { slots: { default: 'createTime' }, title: '审核时间', width: 200 },
            { fixed: 'right', slots: { default: 'operate' }, title: '操作', width: 150 },
        ],
        data: [],
        height: 530,
        loading: false,
        showOverflow: false,
        // toolbarConfig: {
        //     slots: {
        //         buttons: 'toolbar_buttons',
        //     },
        // },
    })

    return { gridOptions }
}
